import org.omg.CORBA.PUBLIC_MEMBER;

public enum ColorEnum {
    ONE(1,"红"),TWO(2,"橙"),THREE(3,"黄"),FOUR(4,"绿");
    private int index;
    private String color;
    ColorEnum(int index, String color) {
        this.index = index;
        this.color = color;
    }
    public int getIndex() {
        return index;
    }
    public String getColor() {
        return color;
    }
    public static ColorEnum enumFind(int index){
        for(ColorEnum e : ColorEnum.values()){
            if(e.getIndex()== index)
                return e;
        }
        return null;
    }
}
